package com.example.demo03_mvm.utils;

import android.widget.ImageView;

import androidx.databinding.BindingAdapter;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.example.demo03_mvm.R;

public class ImageUtils {
    @BindingAdapter("url")
    public static void setIamge(ImageView iv,String path){
        Glide.with(iv).load(path).error(R.drawable.ic_launcher_background).transform(new CenterCrop(),new RoundedCorners(20)).into(iv);
    }
}
